package com.cskaoyan.controller.admin;

import com.cskaoyan.bean.BaseRespVo;
import com.cskaoyan.bean.PageDataVo;
import com.cskaoyan.bean.admin.Log;
import com.cskaoyan.bean.admin.bo.LogListBo;
import com.cskaoyan.service.admin.LogService;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 类<code>Doc</code>用于：TODO
 *
 * @author Acher
 * @version 1.0
 * @date 2021-10-19
 */
@RestController
public class LogController {

    @Autowired
    LogService logService;

    @RequiresPermissions("admin:log:list")
    @RequestMapping("admin/log/list")
    // http://localhost:8083/admin/log/list?page=1&limit=20&sort=add_time&order=desc
    public BaseRespVo list(LogListBo logListBo) {
        PageDataVo pageDataVo = logService.query(logListBo);
        return BaseRespVo.ok(pageDataVo);
    }
}
